﻿@model ApplePayModel
<!-- Set up a container element for the Apple Pay button -->
<div id="paypal-apple-pay-container"
     data-init-transaction-url="@Url.Action("InitTransaction", "PayPal")"
     data-get-payment-request-url="@Url.Action("GetApplePayPaymentRequest", "PayPal")"
     data-create-order-url="@Url.Action("CreateOrder", "PayPal")"
     data-forward-url="@Url.Action("BillingAddress", "Checkout")"
     data-log-client-message-url="@Url.Action("LogClientMessage", "PayPal")"
     data-is-sandbox="@(Model.IsSandbox ? "true" : "false")"
     data-route-ident="@Model.RouteIdent"
     data-transaction-error="@T("Plugins.Smartstore.PayPal.Error.ApplePayTranactionError")">
</div>

@*INFO: No target zone here as can also be rendered via AJAX*@
<script data-origin="paypal-apple-pay-button">
    $(function () {    
        const ppApplePayButton = new ApplePayPayPalButton();
    });
</script>
